package com.xzjt.common.enumeration;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @ClassName: ResultCodeEnum
 * @Author: yuandong
 * @Date 2021/10/14 10:51
 * 后端异常枚举类
 */

@AllArgsConstructor
@NoArgsConstructor
@Getter
public enum ResultCodeEnum {

    SUCCESS("0","成功"), // 成功
    SERVICE_FAIL("1","业务错误"),    // 业务失败
    UNLOGIN("901","访问资源需要登录"),       // 访问资源需要登录
    UNAUTHORIZED("902"," 权限不足"),  // 权限不足
    TOKEN_EXPRIED("903","token过期"), // 过期的token
    TOKEN_INVALID("904","token无效"), // 无效的token
    ACCOUNT_ERROR("905","账号或密码错误"), // 账号或密码错误
    ACCOUNT_STATUS_EXCEPTION("906","账号状态异常"),  // 账号状态异常
    PARAMS_EXCEPTION("907","参数异常"),  // 参数异常
    VERIFY_CODE_EXCEPTION("908","验证码异常"),     // 验证码异常
    SERVER_NOTFOUND("909","服务器未找到相关资源"),   // 服务器未找到相关资源
    SERVER_ERROR("500","服务器发生异常");  // 服务器发生异常

    public String  code;
    public String  des;

}
